﻿@model FILSTARTUPS_MOBILE.Models.ForumThread

@{
    ViewBag.Title = "CreateThread";
    if (User.Identity.IsAuthenticated)
    {
        Layout = "~/Views/Shared/_Layout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_LayoutNonMember.cshtml";
    }
}

<h2>CreateThread</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm("CreateThread", "Forum", FormMethod.Post))
{
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>ForumThread</legend>

        <input type="hidden" value="@ViewBag.forumidFK" id="forumdidFK" name="forumidFK" />
      
        <div class="editor-label">
            @Html.LabelFor(model => model.forumtitle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.forumtitle)
            @Html.ValidationMessageFor(model => model.forumtitle)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.forumdescription)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.forumdescription)
            @Html.ValidationMessageFor(model => model.forumdescription)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.tags)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.tags)
            @Html.ValidationMessageFor(model => model.tags)
        </div>

        <p>
            <div data-role="controlgroup" data-type="horizontal">
            <input type="submit" data-inline="true" value="Create" />
            <a href="Index" data-role="button" >Cancel</a>
            </div>
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
